FROM ubuntu:18.04

RUN sed -i 's/archive\.ubuntu\.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
    sed -i 's/security\.ubuntu\.com/mirrors.aliyun.com/g' /etc/apt/sources.list

RUN apt-get update && \
	apt-get install  -yq  --no-install-recommends \
	build-essential wget ca-certificates python3 python3-dev libssl-dev && \
	apt-get clean && \
	rm -rf /var/lib/apt/lists/* && \
	ln -sf /usr/bin/python3 /usr/bin/python

# pip CN mirror
RUN mkdir -p ~/.pip && \
	echo "[global]" > ~/.pip/pip.conf && \
	echo "trusted-host=mirrors.aliyun.com" >> ~/.pip/pip.conf && \
	echo "index-url=https://mirrors.aliyun.com/pypi/simple/"  >> ~/.pip/pip.conf

RUN wget -O get-pip.py  https://bootstrap.pypa.io/get-pip.py  && python get-pip.py && rm get-pip.py

RUN pip install mlflow pysftp boto3

